using BackData;
using Domain.DTOs.RBAC;
using MediatR;

namespace Team.API.Applocation.Command.Users.Permissions
{
    /// <summary>
    /// 创建权限命令
    /// </summary>
    public class CreatePermissionCommand : IRequest<APIResult<PermissionDTO>>
    {
        /// <summary>
        /// 权限编号
        /// </summary>
        public string PermissionCode { get; set; }

        /// <summary>
        /// 权限名称
        /// </summary>
        public string PermissionName { get; set; }

        /// <summary>
        /// 权限路径/路由地址
        /// </summary>
        public string? PermissionUrl { get; set; }

        /// <summary>
        /// 父级权限ID（0表示顶级权限）
        /// </summary>
        public long ParentId { get; set; } = 0;

        /// <summary>
        /// 权限类型（1-目录，2-菜单，3-按钮，4-API）
        /// </summary>
        public int PermissionType { get; set; } = 2;

        /// <summary>
        /// 权限图标
        /// </summary>
        public string? Icon { get; set; }

        /// <summary>
        /// 排序号
        /// </summary>
        public int Sort { get; set; } = 0;

        /// <summary>
        /// 权限描述
        /// </summary>
        public string? Description { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
    }
}
